<template>
    <div>
        <!-- 财务管理 -->
        <!-- 左侧导航栏 -->
        <el-row>
            <el-col :span="4" class="left-nav">
                <el-menu
                    :default-active="dfActive"
                    class="el-menu-vertical-demo">
                    <el-submenu index="1">
                        <template slot="title">
                        <img src="../../assets/imgs/bar_icon_chepiao_default.png" alt="">&nbsp;
                        <span>票据管理</span>
                        </template>
                        <el-menu-item-group>
                        <el-menu-item index="1-1" @click="jumpTo(1)">票据库</el-menu-item>
                        <el-menu-item index="1-2" @click="jumpTo(2)">票据领用</el-menu-item>
                        <el-menu-item index="1-3" @click="jumpTo(3)">票据领用查询</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="2">
                        <template slot="title">
                        <img src="../../assets/imgs/bar_icon_dingyi_default.png" alt="">&nbsp;
                        <span>优惠管理</span>
                        </template>
                        <el-menu-item-group>
                        <el-menu-item index="2-1" @click="jumpTo(12)">优惠类型</el-menu-item>
                        <el-menu-item index="2-2" @click="jumpTo(13)">优惠卷库</el-menu-item>
                        <el-menu-item index="2-2" @click="jumpTo(14)">优惠券领出</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="3">
                        <template slot="title">
                        <img src="../../assets/imgs/bar_icon_chepiao_default.png" alt="">&nbsp;
                        <span>电子客票管理</span>
                        </template>
                        <el-menu-item-group>
                        <el-menu-item index="3-2" @click="jumpTo(15)">票号库</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="4">
                        <template slot="title">
                        <img src="../../assets/imgs/bar_icon_danan_default.png" alt="">&nbsp;
                        <span>缴款</span>
                        </template>
                        <el-menu-item-group>
                        <el-menu-item index="4-1" @click="jumpTo(4)">不定期缴款</el-menu-item>
                        <el-menu-item index="4-2" @click="jumpTo(5)">汇总单缴款</el-menu-item>
                        <el-menu-item index="4-3" @click="jumpTo(6)">汇总单查询</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                    <el-submenu index="5">
                        <template slot="title">
                        <img src="../../assets/imgs/bar_icon_ziliao_default.png" alt="">&nbsp;
                        <span>结算</span>
                        </template>
                        <el-menu-item-group>
                        <el-menu-item index="5-1" @click="jumpTo(7)">结算单位</el-menu-item>
                        <el-menu-item index="5-2" @click="jumpTo(8)">结算费用</el-menu-item>
                        <el-menu-item index="5-3" @click="jumpTo(9)">结算方案</el-menu-item>
                        <el-menu-item index="5-4" @click="jumpTo(10)">结算汇总</el-menu-item>
                        <el-menu-item index="5-5" @click="jumpTo(11)">结算查询</el-menu-item>
                        </el-menu-item-group>
                    </el-submenu>
                </el-menu>
            </el-col>
            <!-- 路由 -->
            <el-col :span="20" class="router-container">
                <router-view @sendActive="getActive"></router-view>
            </el-col>
        </el-row>
    </div>
</template>

<script>
export default {
    data: function(){
        return {
            dfActive:"1-1"
        }
    },
    methods:{
        jumpTo(i){
            switch(i){
                case 1:this.$router.push("/index/financeManage/ticketKu");break;
                case 2:this.$router.push("/index/financeManage/ticketGet");break;
                case 3:this.$router.push("/index/financeManage/ticketGetCheck");break;
                case 4:this.$router.push("/index/financeManage/payUntime");break;
                case 5:this.$router.push("/index/financeManage/listPay");break;
                case 6:this.$router.push("/index/financeManage/listCheck");break;
                case 7:this.$router.push("/index/financeManage/accountCom");break;
                case 8:this.$router.push("/index/financeManage/accountNum");break;
                case 9:this.$router.push("/index/financeManage/accountFun");break;
                case 10:this.$router.push("/index/financeManage/accountSum");break;
                case 11:this.$router.push("/index/financeManage/accountCheck");break;
                case 12:this.$router.push("/index/financeManage/discountType");break;
                case 13:this.$router.push("/index/financeManage/discountKu");break;
                case 14:this.$router.push("/index/financeManage/discountOut");break;
                case 15:this.$router.push("/index/financeManage/ticketNumKu");break;
            }
        },
        getActive(val){
            this.dfActive=val;
            console.log(this.dfActive)
        }
    },
    computed:{},
    watch:{},
    mounted() {
        this.$emit("sendTag",4);
    }
}   
</script>
<style scoped>
.left-nav{
    border:1px solid #EDEEF0;
}
</style>
